package com.yyl.rbacs.sys.controller;

import com.yyl.rbacs.sys.entity.SysUser;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

/**
 * @BelongsProject: rbacs
 * @BelongsPackage: com.yyl.rbacs.sys.controller
 * @Author: YuanSir
 * @CreateTime: 2022-10-31  10:09
 * @Description:
 * @Version: 1.0
 */

/**
 * Controller 层公用父类
 */
public abstract class AbstractController {
    
    /**
     *
     * @return
     */
    protected SysUser getCurrentUser(){
    
        Subject subject = SecurityUtils.getSubject();
    
        return (SysUser) subject.getPrincipal();
        
    }
    
}
